package GUINew;

import javax.swing.JPanel;
import javax.swing.border.LineBorder;
import javax.swing.border.SoftBevelBorder;
import javax.swing.border.TitledBorder;
import java.awt.Dimension;
import javax.swing.JLabel;
import javax.swing.SwingConstants;
import javax.swing.JTextField;
import java.awt.Font;
import java.awt.Color;
import javax.swing.UIManager;
import javax.swing.border.BevelBorder;
import javax.swing.JProgressBar;

import com.jgoodies.forms.factories.FormFactory;
import com.jgoodies.forms.layout.FormLayout;
import com.jgoodies.forms.layout.ColumnSpec;
import com.jgoodies.forms.layout.RowSpec;

public class StatusModule extends JPanel
{
   private JTextField txtV;
   private JTextField txtOff;
   private JTextField txtBeleuchtungLinks;
   private JTextField txtOff_1;
   private JTextField txtKpa;
   private JTextField txtc;

   /**
    * Create the panel.
    */
   public StatusModule()
   {
      setBackground(Color.DARK_GRAY);
      setPreferredSize(new Dimension(240, 260));
      setBorder(null);
      setLayout(null);
      
      JPanel panel = new JPanel();
      panel.setBackground(Color.DARK_GRAY);
      panel.setBorder(new TitledBorder(null, "Status", TitledBorder.LEADING, TitledBorder.TOP, null, Color.GREEN));
      panel.setBounds(0, 0, 158, 260);
      add(panel);
      panel.setLayout(new FormLayout(new ColumnSpec[] {
            FormFactory.RELATED_GAP_COLSPEC,
            ColumnSpec.decode("default:grow"),},
         new RowSpec[] {
            FormFactory.RELATED_GAP_ROWSPEC,
            FormFactory.DEFAULT_ROWSPEC,
            FormFactory.RELATED_GAP_ROWSPEC,
            FormFactory.DEFAULT_ROWSPEC,
            FormFactory.RELATED_GAP_ROWSPEC,
            FormFactory.DEFAULT_ROWSPEC,
            FormFactory.RELATED_GAP_ROWSPEC,
            FormFactory.DEFAULT_ROWSPEC,
            FormFactory.RELATED_GAP_ROWSPEC,
            FormFactory.DEFAULT_ROWSPEC,
            FormFactory.RELATED_GAP_ROWSPEC,
            FormFactory.DEFAULT_ROWSPEC,
            FormFactory.RELATED_GAP_ROWSPEC,
            FormFactory.DEFAULT_ROWSPEC,
            FormFactory.RELATED_GAP_ROWSPEC,
            FormFactory.DEFAULT_ROWSPEC,
            FormFactory.RELATED_GAP_ROWSPEC,
            FormFactory.DEFAULT_ROWSPEC,
            FormFactory.RELATED_GAP_ROWSPEC,
            FormFactory.DEFAULT_ROWSPEC,}));
      
      JLabel lblNewLabel_3 = new JLabel("Aussendruck");
      lblNewLabel_3.setForeground(Color.ORANGE);
      lblNewLabel_3.setHorizontalAlignment(SwingConstants.CENTER);
      panel.add(lblNewLabel_3, "1, 2, 2, 1, default, bottom");
      
      txtKpa = new JTextField();
      txtKpa.setBackground(Color.DARK_GRAY);
      txtKpa.setFont(new Font("Tahoma", Font.BOLD, 12));
      txtKpa.setHorizontalAlignment(SwingConstants.CENTER);
      txtKpa.setForeground(Color.GREEN);
      txtKpa.setEditable(false);
      txtKpa.setText("1000 KPA");
      panel.add(txtKpa, "1, 4, 2, 1, center, top");
      txtKpa.setColumns(10);
      
      JLabel lblTemperatur = new JLabel("Temperatur");
      lblTemperatur.setHorizontalAlignment(SwingConstants.CENTER);
      lblTemperatur.setForeground(Color.ORANGE);
      panel.add(lblTemperatur, "1, 6, 2, 1, fill, bottom");
      
      txtc = new JTextField();
      txtc.setText("20 \u00B0C");
      txtc.setBackground(Color.DARK_GRAY);
      txtc.setHorizontalAlignment(SwingConstants.CENTER);
      txtc.setForeground(Color.GREEN);
      txtc.setFont(new Font("Tahoma", Font.BOLD, 12));
      panel.add(txtc, "1, 8, 2, 1, center, top");
      txtc.setColumns(10);
      
      JLabel lblNewLabel = new JLabel("Hauptbeleuchtung");
      lblNewLabel.setHorizontalAlignment(SwingConstants.CENTER);
      lblNewLabel.setForeground(Color.ORANGE);
      panel.add(lblNewLabel, "1, 10, 2, 1, fill, bottom");
      
      txtOff = new JTextField();
      txtOff.setBorder(new SoftBevelBorder(BevelBorder.RAISED, null, null, null, null));
      txtOff.setBackground(Color.GREEN);
      txtOff.setEditable(false);
      txtOff.setText("ON");
      txtOff.setHorizontalAlignment(SwingConstants.CENTER);
      panel.add(txtOff, "1, 12, 2, 1, center, fill");
      txtOff.setColumns(10);
      
      JLabel lblNewLabel_1 = new JLabel("Beleuchtung links");
      lblNewLabel_1.setForeground(Color.ORANGE);
      lblNewLabel_1.setHorizontalAlignment(SwingConstants.CENTER);
      panel.add(lblNewLabel_1, "1, 14, 2, 1, fill, bottom");
      
      txtOff_1 = new JTextField();
      txtOff_1.setBorder(new SoftBevelBorder(BevelBorder.RAISED, null, null, null, null));
      txtOff_1.setBackground(Color.RED);
      txtOff_1.setText("OFF");
      txtOff_1.setHorizontalAlignment(SwingConstants.CENTER);
      panel.add(txtOff_1, "1, 16, 2, 1, center, default");
      txtOff_1.setColumns(10);
      
      JLabel lblNewLabel_2 = new JLabel("Beleuchtung rechts");
      lblNewLabel_2.setForeground(Color.ORANGE);
      lblNewLabel_2.setHorizontalAlignment(SwingConstants.CENTER);
      panel.add(lblNewLabel_2, "1, 18, 2, 1, fill, bottom");
      
      txtBeleuchtungLinks = new JTextField();
      txtBeleuchtungLinks.setForeground(Color.BLACK);
      txtBeleuchtungLinks.setHorizontalAlignment(SwingConstants.CENTER);
      txtBeleuchtungLinks.setText("OFF");
      txtBeleuchtungLinks.setBackground(Color.RED);
      txtBeleuchtungLinks.setBorder(new SoftBevelBorder(BevelBorder.RAISED, null, null, null, null));
      panel.add(txtBeleuchtungLinks, "1, 20, 2, 1, center, default");
      txtBeleuchtungLinks.setColumns(10);
      
      JPanel panel_1 = new JPanel();
      panel_1.setBackground(Color.DARK_GRAY);
      panel_1.setBorder(new TitledBorder(UIManager.getBorder("TitledBorder.border"), "Akku", TitledBorder.LEADING, TitledBorder.TOP, null, Color.GREEN));
      panel_1.setBounds(161, 0, 79, 260);
      add(panel_1);
      panel_1.setLayout(null);
      
      JProgressBar progressBar = new JProgressBar();
      progressBar.setStringPainted(true);
      progressBar.setString("100%");
      progressBar.setValue(100);
      progressBar.setBounds(15, 30, 49, 179);
      progressBar.setOrientation(SwingConstants.VERTICAL);
      panel_1.add(progressBar);
      
      txtV = new JTextField();
      txtV.setHorizontalAlignment(SwingConstants.CENTER);
      txtV.setFont(new Font("Arial Rounded MT Bold", Font.PLAIN, 13));
      txtV.setForeground(Color.GREEN);
      txtV.setText("12,0 V");
      txtV.setBorder(new LineBorder(Color.WHITE, 1, true));
      txtV.setBackground(Color.DARK_GRAY);
      txtV.setEditable(false);
      txtV.setBounds(15, 220, 49, 25);
      panel_1.add(txtV);
      txtV.setColumns(10);
      
      JPanel panel_2 = new JPanel();
      panel_2.setBounds(0, 0, 10, 10);
      add(panel_2);
      panel_2.setLayout(new FormLayout(new ColumnSpec[] {},
         new RowSpec[] {}));

   }
}
